home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / opengldoc / glspec / make_current_read.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  6.3 KB  |  174 lines

  1. Name
  2.  
  3.     SGI_make_current_read
  4.  
  5. Name Strings
  6.  
  7.     GLX_SGI_make_current_read
  8.  
  9. Version
  10.  
  11.     $Date: 1996/04/01 23:23:01 $ $$
  12.  
  13. Number
  14.  
  15.     42
  16.  
  17. Dependencies
  18.  
  19.     EXT_copy_texture is affected by this specification.
  20.     EXT_convolution is affected by this specification.
  21.     SGI_color_table is affected by this specification.
  22.     
  23. Overview
  24.  
  25.     The association of the current context with a drawable is extended to allow
  26.     separate write and read drawables.  This paves the way for allowing
  27.     preprocessing of image data in an "off screen" window which is then read
  28.     into the visible window for final display.  Similarly it sets the
  29.     frame-work for direct transfer of video to the GL, by treating the video
  30.     as a special kind of read drawable (a.k.a, readable).
  31.  
  32.  
  33. New Procedures and Functions
  34.  
  35.     Bool glXMakeCurrentReadSGI(Display* dpy,
  36.                    GLXDrawable draw,
  37.                    GLXDrawable read,
  38.                    GLXContext ctx);
  39.  
  40.     GLXDrawable glXGetCurrentReadDrawableSGI(void);
  41.  
  42. New Tokens
  43.  
  44.     None
  45.  
  46. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  47.  
  48.     None
  49.  
  50. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  51.  
  52.     None
  53.  
  54. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  55. and the Frame buffer)
  56.  
  57.     If glXMakeCurrentReadSGI is used to associate two glXDrawables with
  58.     the current rendering context, glXDrawable <draw> is used for all
  59.     OpenGL operations except:
  60.  
  61.     1.    Any pixel data that are sourced based on the value of READ_BUFFER.
  62.         Note, that accumulation operations use the value of READ_BUFFER, but
  63.     are not allowed when <draw> in not identical to <read>.
  64.  
  65.     2.    Any depth values that are retrieved by glReadPixels, glCopyPixels,
  66.     or any OpenGL extension that sources depth images from the frame
  67.     buffer in the manner of glReadPixels and glCopyPixels.
  68.  
  69.     3.    Any stencil values that are retrieved by glReadPixels, glCopyPixels,
  70.     or any OpenGL extension that sources stencil images from the frame
  71.     buffer in the manner of glReadPixels and glCopyPixels.
  72.  
  73.     These frame buffer values are taken from glXDrawable <read>.
  74.  
  75.     No error will be generated if the value of READ_BUFFER at the time the
  76.     glXMakeCurrentReadSGI call is made does not correspond to a valid color
  77.     buffer in <read>.  Also, no error due to READ_BUFFER mismatch will be
  78.     generated by subsequent calls to any of the operations enumerated above,
  79.     but the pixels values used will be undefined until READ_BUFFER is set to a
  80.     color buffer that is valid in the <read>.  Operations that query the value
  81.     of READ_BUFFER (i.e., glGet, glPushAttrib) use the value set last in the
  82.     context, independent of whether it is a valid buffer in <read>.
  83.     Subsequent to a glXMakeCurrentRead call, it is possible that the
  84.     READ_BUFFER may be set to a color buffer that is not valid with respect to
  85.     the visual of the context.  The preceding discussion also applies to
  86.     glXMakeCurrent where <read> is replaced by the single drawable parameter
  87.     to the call.
  88.  
  89.     Error conditions set by glDrawBuffer (even when called implicitly via
  90.     glPopAttrib) and by the operations enumerated above are with respect to
  91.     color and ancillary buffers available in <read> (i.e.,
  92.     glReadBuffer(GL_BACK_BUFFER) will generate an error when <read> is single
  93.     buffered, and so will an operation that tries to source stencil images
  94.     when <read> does not have a stencil buffer).
  95.  
  96.     The following restriction is added to the end of the introductory
  97.     paragraph of section 4.2.4 "The Accumulation Buffer": Accumulation
  98.     operations are only allowed when the glXDrawbles <write> and <draw> are
  99.     identical.
  100.  
  101.     The list of error conditions at the end of section 4.2.4 "The Accumulation
  102.     Buffer" is modified to: If there is no accumulation buffer, the GL is in
  103.     color index mode, or if the glXDrawbles <write> and <read> are not
  104.     identical then Accum generates the error INVALID_OPERATION.
  105.  
  106. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  107.  
  108.     None
  109.  
  110. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  111.  
  112.     None
  113.  
  114. Additions to the GLX Specification
  115.  
  116.     XXX - not complete yet
  117.  
  118.     Notes:
  119.  
  120.     *    glXMakeCurrentReadSGIX associates two GLXDrawables with a single
  121.     GLXContext.  BadMatch is generated if <draw> was not created with
  122.     the same X screen and visual as <ctx>.  BadMatch is also generated
  123.     if <read> was not created with the same X screen as <ctx>.  The color,
  124.     depth, stencil, and accumulation buffers of <read> need not match the
  125.     resources of <draw>.
  126.  
  127.     *    glXMakeCurrentReadSGI returns True if it succeeds, and False if it
  128.     fails.  It can fail for myriad reasons, including refusal to accept
  129.     a window or a GLXPixmap as the <read> GLXDrawable, and refusal to
  130.     accept as the <read> a GLXDrawable or a GLXPbuffer with color, depth,
  131.     stencil, or accumulation storage facilities that differ from those
  132.     of <draw>.  This laxness may not be acceptable in a final
  133.     specification, but it will help allow early implementations to
  134.     be completed.
  135.  
  136.     *   glXMakeCurrentReadSGI may return False if <draw> and <read> cannot 
  137.         exist in framebuffer memory simultaneously.
  138.  
  139.     *    glXGetCurrentReadDrawableSGI returns the name of the GLXDrawable
  140.     currently being used as a pixel query source.  If glXMakeCurrent
  141.     specified the current rendering context, then
  142.     glXGetCurrentReadDrawableSGI returns the drawable specified as
  143.     <draw> by that glXMakeCurrent call.  If glXMakeCurrentReadSGI
  144.     specified the current rendering context, then
  145.     glXGetCurrentReadDrawableSGI returns the drawable specified as
  146.     <read> by that glXMakeCurrentReadSGI call.  If there is no
  147.     current read drawable, None is returned.
  148.     
  149. Dependencies on EXT_copy_texture
  150.  
  151.     Texture image data are sourced from GLXDrawable <read> if the
  152.     current OpenGL rendering context was specified by glXMakeCurrentReadSGIX.
  153.  
  154. Dependencies on EXT_convolution
  155.  
  156.     Convolution image data are sourced from GLXDrawable <read> if the
  157.     current OpenGL rendering context was specified by glXMakeCurrentReadSGIX,
  158.     and the transfer is specified by CopyConvolutionFilter1DEXT or
  159.     CopyConvolutionFilter2DEXT.
  160.  
  161. Dependencies on SGI_color_table
  162.  
  163.     Color table data are sourced from GLXDrawable <read> if the current
  164.     OpenGL rendering context was specified by glXMakeCurrentReadSGIX,
  165.     and the transfer is specified by CopyColorTableSGI.
  166.  
  167. New State
  168.  
  169.     None
  170.  
  171. New Implementation Dependent State
  172.  
  173.    None
  174.